--for surface lovers who are also tech lovers
-- URANIUM.................................11
-- CHROMIUM...............................218
-- ZINC...................................425
-- LEAD...................................632
-- SULFUR.................................839
-- GRANITE................................915
-- MARBLE................................1000

if(minetest.get_modpath("technic_worldgen")) ~= nil then
-- URANIUM
--craft
minetest.register_craft({
	output = '"orewood:uraniumwood_fake"',
	recipe = {
		{'technic:uranium_block', 'technic:uranium_block','technic:uranium_block'},
		{'technic:uranium_block', 'group:orewood_technic','technic:uranium_block'},
		{'technic:uranium_block', 'technic:uranium_block','technic:uranium_block'},
	}
})

minetest.register_craft({
	output = '"orewood:uraniumwood"',
	recipe = {
		{'group:stone', 'group:wood','group:stone'},
		{'group:wood', 'technic:uranium_block','group:wood'},
		{'group:stone', 'group:wood','group:stone'},
	}
})
--cook
minetest.register_craft({
	type = "cooking",
	output = "orewood:uraniumwood_hot",
	recipe = "group:orew_uranium",
})
--wooden nodes
minetest.register_node(":orewood:uraniumwood", {
	description = "Uraniumwood",
	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png^technic_mineral_uranium.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_uranium=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--hot
minetest.register_node(":orewood:uraniumwood_hot", {
	description = "Hot Uraniumwood",
	tiles = {"default_furnace_top.png", "default_furnace_top.png", "default_coal_block.png^technic_uranium_ingot.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_hot=1,choppy=2,oddly_breakable_by_hand=1},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--fake nodes
minetest.register_node(":orewood:uraniumwood_fake", {
	description = "Fake Uraniumwood",
	tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_tree.png^technic_mineral_uranium.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_fake=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--papy nodes
minetest.register_node(":orewood:uraniumpapy", {
	description = "Uraniumpapy",
	drop = "technic:uranium_lump",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_uranium_block.png^orewood_cover_mp.png^[makealpha:255,0,255"},
	inventory_image = "technic_uranium_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	wield_image = "technic_uranium_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3,flammable=2},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})

minetest.register_node(":orewood:uraniumpapy_ingot", {
	description = "Uraniumingotpapy",
	drop = "technic:uranium_ingot",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_uranium_block.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_uranium_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_uranium_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--ABMs srpout
minetest.register_abm({
	nodenames = {"orewood:uraniumwood"},
	neighbors = {"default:water_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:uraniumwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:uraniumpapy"})
	end,
})

minetest.register_abm({
	nodenames = {"orewood:uraniumwood_hot"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:uraniumwood_hot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:uraniumpapy_ingot"})
	end,
})
--ABMs grow
minetest.register_abm({
	nodenames = {"orewood:uraniumpapy"},
	neighbors = {"orewood:uraniumwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:uraniumwood"
	and name ~= "orewood:uraniumwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:water"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:uraniumpapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:uraniumpapy"})
	return true
end,
})

minetest.register_abm({
	nodenames = {"orewood:uraniumpapy_ingot"},
	neighbors = {"orewood:uraniumwood_hot"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:uraniumwood_hot"
	and name ~= "orewood:uraniumwood_hot" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:uraniumpapy_ingot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:uraniumpapy_ingot"})
	return true
end,
})

-- CHROMIUM
--craft
minetest.register_craft({
	output = '"orewood:chromiumwood_fake"',
	recipe = {
		{'technic:chromium_block', 'technic:chromium_block','technic:chromium_block'},
		{'technic:chromium_block', 'group:orewood_technic','technic:chromium_block'},
		{'technic:chromium_block', 'technic:chromium_block','technic:chromium_block'},
	}
})

minetest.register_craft({
	output = '"orewood:chromiumwood"',
	recipe = {
		{'group:stone', 'group:wood','group:stone'},
		{'group:wood', 'technic:chromium_block','group:wood'},
		{'group:stone', 'group:wood','group:stone'},
	}
})
--cook
minetest.register_craft({
	type = "cooking",
	output = "orewood:chromiumwood_hot",
	recipe = "group:orew_chromium",
})
--wooden nodes
minetest.register_node(":orewood:chromiumwood", {
	description = "Chromiumwood",
	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png^technic_mineral_chromium.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_chromium=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--hot
minetest.register_node(":orewood:chromiumwood_hot", {
	description = "Hot Chromiumwood",
	tiles = {"default_furnace_top.png", "default_furnace_top.png", "default_coal_block.png^technic_chromium_ingot.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_hot=1,choppy=2,oddly_breakable_by_hand=1},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--fake nodes
minetest.register_node(":orewood:chromiumwood_fake", {
	description = "Fake Chromiumwood",
	tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_tree.png^technic_mineral_chromium.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_fake=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--papy nodes
minetest.register_node(":orewood:chromiumpapy", {
	description = "Chromiumpapy",
	drop = "technic:chromium_lump",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_chromium_block.png^orewood_cover_mp.png^[makealpha:255,0,255"},
	inventory_image = "technic_chromium_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	wield_image = "technic_chromium_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3,flammable=2},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})

minetest.register_node(":orewood:chromiumpapy_ingot", {
	description = "Chromiumingotpapy",
	drop = "technic:chromium_ingot",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_chromium_block.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_chromium_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_chromium_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--ABMs srpout
minetest.register_abm({
	nodenames = {"orewood:chromiumwood"},
	neighbors = {"default:water_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:chromiumwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:chromiumpapy"})
	end,
})

minetest.register_abm({
	nodenames = {"orewood:chromiumwood_hot"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:chromiumwood_hot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:chromiumpapy_ingot"})
	end,
})
--ABMs grow
minetest.register_abm({
	nodenames = {"orewood:chromiumpapy"},
	neighbors = {"orewood:chromiumwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:chromiumwood"
	and name ~= "orewood:chromiumwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:water"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:chromiumpapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:chromiumpapy"})
	return true
end,
})

minetest.register_abm({
	nodenames = {"orewood:chromiumpapy_ingot"},
	neighbors = {"orewood:chromiumwood_hot"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:chromiumwood_hot"
	and name ~= "orewood:chromiumwood_hot" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:chromiumpapy_ingot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:chromiumpapy_ingot"})
	return true
end,
})

-- ZINC
--craft
minetest.register_craft({
	output = '"orewood:zincwood_fake"',
	recipe = {
		{'technic:zinc_block', 'technic:zinc_block','technic:zinc_block'},
		{'technic:zinc_block', 'group:orewood_technic','technic:zinc_block'},
		{'technic:zinc_block', 'technic:zinc_block','technic:zinc_block'},
	}
})

minetest.register_craft({
	output = '"orewood:zincwood"',
	recipe = {
		{'group:stone', 'group:wood','group:stone'},
		{'group:wood', 'technic:zinc_block','group:wood'},
		{'group:stone', 'group:wood','group:stone'},
	}
})
--cook
minetest.register_craft({
	type = "cooking",
	output = "orewood:zincwood_hot",
	recipe = "group:orew_zinc",
})
--wooden nodes
minetest.register_node(":orewood:zincwood", {
	description = "Zincwood",
	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png^technic_mineral_zinc.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_zinc=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--hot
minetest.register_node(":orewood:zincwood_hot", {
	description = "Hot Zincwood",
	tiles = {"default_furnace_top.png", "default_furnace_top.png", "default_coal_block.png^technic_zinc_ingot.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_hot=1,choppy=2,oddly_breakable_by_hand=1},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--fake nodes
minetest.register_node(":orewood:zincwood_fake", {
	description = "Fake Zincwood",
	tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_tree.png^technic_mineral_zinc.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_fake=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--papy nodes
minetest.register_node(":orewood:zincpapy", {
	description = "Zincpapy",
	drop = "technic:zinc_lump",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_zinc_block.png^orewood_cover_mp.png^[makealpha:255,0,255"},
	inventory_image = "technic_zinc_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	wield_image = "technic_zinc_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3,flammable=2},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})

minetest.register_node(":orewood:zincpapy_ingot", {
	description = "Zincingotpapy",
	drop = "technic:zinc_ingot",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_zinc_block.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_zinc_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_zinc_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--ABMs srpout
minetest.register_abm({
	nodenames = {"orewood:zincwood"},
	neighbors = {"default:water_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:zincwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:zincpapy"})
	end,
})

minetest.register_abm({
	nodenames = {"orewood:zincwood_hot"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:zincwood_hot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:zincpapy_ingot"})
	end,
})
--ABMs grow
minetest.register_abm({
	nodenames = {"orewood:zincpapy"},
	neighbors = {"orewood:zincwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:zincwood"
	and name ~= "orewood:zincwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:water"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:zincpapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:zincpapy"})
	return true
end,
})

minetest.register_abm({
	nodenames = {"orewood:zincpapy_ingot"},
	neighbors = {"orewood:zincwood_hot"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:zincwood_hot"
	and name ~= "orewood:zincwood_hot" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:zincpapy_ingot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:zincpapy_ingot"})
	return true
end,
})

-- LEAD
--craft
minetest.register_craft({
	output = '"orewood:leadwood_fake"',
	recipe = {
		{'technic:lead_block', 'technic:lead_block','technic:lead_block'},
		{'technic:lead_block', 'group:orewood_technic','technic:lead_block'},
		{'technic:lead_block', 'technic:lead_block','technic:lead_block'},
	}
})

minetest.register_craft({
	output = '"orewood:leadwood"',
	recipe = {
		{'group:stone', 'group:wood','group:stone'},
		{'group:wood', 'technic:lead_block','group:wood'},
		{'group:stone', 'group:wood','group:stone'},
	}
})
--cook
minetest.register_craft({
	type = "cooking",
	output = "orewood:leadwood_hot",
	recipe = "group:orew_lead",
})
--wooden nodes
minetest.register_node(":orewood:leadwood", {
	description = "Leadwood",
	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png^technic_mineral_lead.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_lead=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--hot
minetest.register_node(":orewood:leadwood_hot", {
	description = "Hot Leadwood",
	tiles = {"default_furnace_top.png", "default_furnace_top.png", "default_coal_block.png^technic_lead_ingot.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_hot=1,choppy=2,oddly_breakable_by_hand=1},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--fake nodes
minetest.register_node(":orewood:leadwood_fake", {
	description = "Fake Leadwood",
	tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_tree.png^technic_mineral_lead.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {orewood_technic=1,orew_fake=1,tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),

	on_place = minetest.rotate_node
})
--papy nodes
minetest.register_node(":orewood:leadpapy", {
	description = "Leadpapy",
	drop = "technic:lead_lump",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_lead_block.png^orewood_cover_mp.png^[makealpha:255,0,255"},
	inventory_image = "technic_lead_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	wield_image = "technic_lead_block.png^orewood_cover_mp.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3,flammable=2},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})

minetest.register_node(":orewood:leadpapy_ingot", {
	description = "Leadingotpapy",
	drop = "technic:lead_ingot",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"technic_lead_block.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_lead_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_lead_block.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--ABMs srpout
minetest.register_abm({
	nodenames = {"orewood:leadwood"},
	neighbors = {"default:water_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:leadwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:leadpapy"})
	end,
})

minetest.register_abm({
	nodenames = {"orewood:leadwood_hot"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:leadwood_hot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:leadpapy_ingot"})
	end,
})
--ABMs grow
minetest.register_abm({
	nodenames = {"orewood:leadpapy"},
	neighbors = {"orewood:leadwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:leadwood"
	and name ~= "orewood:leadwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:water"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:leadpapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:leadpapy"})
	return true
end,
})

minetest.register_abm({
	nodenames = {"orewood:leadpapy_ingot"},
	neighbors = {"orewood:leadwood_hot"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:leadwood_hot"
	and name ~= "orewood:leadwood_hot" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:leadpapy_ingot" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:leadpapy_ingot"})
	return true
end,
})

-- SULFUR
--papy nodes
minetest.register_node(":orewood:sulfurpapy", {
	description = "Sulfurpapy",
	drop = "technic:sulfur_lump",
	drawtype = "plantlike",
	stack_max = 999,
	tiles = {"orewood_dust_yellow.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "orewood_dust_yellow.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "orewood_dust_yellow.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--srpout
minetest.register_abm({
	nodenames = {"orewood:fluidwood"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:fluidwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:sulfurpapy"})
	end,
})
--grow
minetest.register_abm({
	nodenames = {"orewood:sulfurpapy"},
	neighbors = {"orewood:fluidwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:fluidwood"
	and name ~= "orewood:fluidwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:sulfurpapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:sulfurpapy"})
	return true
end,
})

-- GRANITE
--craft
minetest.register_craft({
	output = '"technic:granite"',
	recipe = {
		{'orewood:granitepapy', 'orewood:granitepapy','orewood:granitepapy'},
		{'orewood:granitepapy', '','orewood:granitepapy'},
		{'orewood:granitepapy', 'orewood:granitepapy','orewood:granitepapy'},
	}
})
--papy nodes
minetest.register_node(":orewood:granitepapy", {
	description = "Granitepapy",
	drop = "orewood:granitepapy",
	drawtype = "plantlike",
	stack_max = 99,
	tiles = {"technic_granite.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_granite.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_granite.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--srpout
minetest.register_abm({
	nodenames = {"orewood:fluidwood"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:fluidwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:granitepapy"})
	end,
})
--grow
minetest.register_abm({
	nodenames = {"orewood:granitepapy"},
	neighbors = {"orewood:fluidwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:fluidwood"
	and name ~= "orewood:fluidwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:granitepapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:granitepapy"})
	return true
end,
})

-- MARBLE
--craft
minetest.register_craft({
	output = '"technic:marble"',
	recipe = {
		{'orewood:marblepapy', 'orewood:marblepapy','orewood:marblepapy'},
		{'orewood:marblepapy', '','orewood:marblepapy'},
		{'orewood:marblepapy', 'orewood:marblepapy','orewood:marblepapy'},
	}
})
--papy nodes
minetest.register_node(":orewood:marblepapy", {
	description = "Marblepapy",
	drop = "orewood:marblepapy",
	drawtype = "plantlike",
	stack_max = 99,
	tiles = {"technic_marble.png^orewood_cover_mf.png^[makealpha:255,0,255"},
	inventory_image = "technic_marble.png^orewood_cover_mf.png^[makealpha:255,0,255",
	wield_image = "technic_marble.png^orewood_cover_mf.png^[makealpha:255,0,255",
	paramtype = "light",
	walkable = false,
	is_ground_content = true,
	selection_box = {
		type = "fixed",
		fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
	},
	groups = {snappy=3},
	sounds = default.node_sound_leaves_defaults(),

	after_dig_node = function(pos, node, metadata, digger)
		default.dig_up(pos, node, digger)
	end,
})
--srpout
minetest.register_abm({
	nodenames = {"orewood:fluidwood"},
	neighbors = {"default:lava_source"},
	interval = 40,
	chance = 10,
	action = function(pos, node)
	local height = 0
	while node.name == "orewood:fluidwood" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:marblepapy"})
	end,
})
--grow
minetest.register_abm({
	nodenames = {"orewood:marblepapy"},
	neighbors = {"orewood:fluidwood"},
	interval = 50,
	chance = 20,
	action = function(pos, node)
	pos.y = pos.y-1
	local name = minetest.get_node(pos).name
	if name ~= "orewood:fluidwood"
	and name ~= "orewood:fluidwood" then
		return
	end
	if not minetest.find_node_near(pos, 3, {"group:lava"}) then
		return
	end
	pos.y = pos.y+1
	local height = 0
	while node.name == "orewood:marblepapy" and height < 4 do
		height = height+1
		pos.y = pos.y+1
		node = minetest.get_node(pos)
	end
	if height == 4
	or node.name ~= "air" then
		return
	end
	minetest.set_node(pos, {name="orewood:marblepapy"})
	return true
end,
})

end